##解决注册中心和服务不在一个网段，即外网访问<br/>
eureka.instance.ip-address = 118.25.123.16<br/>
eureka.instance.hostname = ${eureka.instance.ip-address}<br/>
eureka.instance.prefer-ip-address = false<br/>
eureka.instance.instance-id = ${eureka.instance.ip-address}:${spring.application.name}:${server.port}<br/>
eureka.instance.lease-renewal-interval-in-seconds = 2<br/>
eureka.instance.lease-expiration-duration-in-seconds = 5<br/>
eureka.client.service-url.defaultZone = http://118.25.123.16:8761/eureka/<br/>


#redis<br/>
spring.redis.host = 118.25.123.16<br/>
spring.redis.password = RHK#c2GxARQqfho8<br/>
spring.redis.port = 6379<br/>
spring.redis.database = 0<br/>


#服务名称<br/>
spring.application.name = cloud-support-gataway<br/>


#服务发现<br/>
spring.cloud.gateway.discovery.locator.enabled = true<br/>
spring.cloud.gateway.discovery.locator.lower-case-service-id = true<br/>

#路由配置<br/>
spring.cloud.gateway.routes[0].id = cloud-support-service<br/>
spring.cloud.gateway.routes[0].uri = lb://cloud-support-service<br/>
spring.cloud.gateway.routes[0].order = 0<br/>
spring.cloud.gateway.routes[0].predicates[0] = Path=/cloud-support-service/**<br/>

#过滤器<br/>
spring.cloud.gateway.routes[0].filters[0] = Request<br/>

#重试过滤器<br/>
spring.cloud.gateway.routes[0].filters[1].name = Retry<br/>
spring.cloud.gateway.routes[0].filters[1].args.retries = 3<br/>
spring.cloud.gateway.routes[0].filters[1].args.status = 405<br/>
spring.cloud.gateway.routes[0].filters[1].args.statusSeries = 500<br/>
spring.cloud.gateway.routes[0].filters[1].args.method = GET<br/>

#路由过滤器<br/>
spring.cloud.gateway.routes[0].filters[2].name = RateCheck<br/>
#限流策略(#{@BeanName})用于限流的键的解析器的 Bean 对象名字（有些绕，看代码吧）。它使用 SpEL 表达式根据#{@beanName}从 Spring 容器中获取 Bean 对象。默认情况下，使用PrincipalNameKeyResolver，以请求认证的java.security.Principal作为限流键
<br/>
spring.cloud.gateway.routes[0].filters[2].args.key-resolver = #{@apiKeyResolver}<br/>
#参考{https://blog.csdn.net/lalacrazy/article/details/82109685}可实现的有令牌桶模型,漏桶算法<br/>
#令牌桶每秒填充平均速率<br/>
spring.cloud.gateway.routes[0].filters[2].args.redis-rate-limiter.replenishRate = 10<br/>
#令牌桶容量<br/>
spring.cloud.gateway.routes[0].filters[2].args.redis-rate-limiter.burstCapacity = 100<br/>


#全局路由过滤器<br/>
spring.cloud.gateway.default-filters[0] = StripPrefix=1<br/>

#全局熔断器处理的过滤<br/>
spring.cloud.gateway.default-filters[1].name = Hystrix<br/>
spring.cloud.gateway.default-filters[1].args.name = authHystrixCommand<br/>
spring.cloud.gateway.default-filters[1].args.fallbackUri = forward:/hystrixTimeout<br/>


#服务端口<br/>
server.port = 8081<br/>

#熔断器超时时间<br/>
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds = 3000<br/>
hystrix.metrics.enabled = true<br/>

#日志级别<br/>
logging.level.org.springframework.cloud.gateway = debug<br/>
